//class A{
//    public void play(){
//        System.out.println("A.play()");
//    }
//}
//class B extends A{
//    public void play(){
//        System.out.println("B.play()");
//    }
//}
class Cycle{
    //static 不可以进行动态绑定（后期绑定）因为静态方法前期绑定，在运行前就已经加载完毕了
    // 也就是静态方法是与类，而不是与某个对象相关联的
    public void ride(){
        System.out.println("ride Cycle");
    }
    public void run(){
        System.out.println("test");
    }
}
class Unicycle extends Cycle{
    public void ride(){
        System.out.println("ride Unicycle");
    }
}
class Bicycle extends Cycle{
    public void ride(){
        System.out.println("ride Bicycle");
    }

    @Override
    public void run() {
        System.out.println("Bicycle test");
    }
}
class Tricycle extends Cycle{
    public void ride() {
        System.out.println("ride Tricycle");
    }
}
public class Test2 {
    public static void ride(Cycle i){
        i.ride();
    }
    public static void main(String[] args) {
        Unicycle unicycle = new Unicycle();
        Bicycle bicycle = new Bicycle();
        Tricycle tricycle = new Tricycle();
        ride(unicycle);
        ride(bicycle);
        ride(tricycle);
    }
//    public static void f(A a){
//        a.play();
//    }
//    public static void main(String[] args) {
//        B b = new B();
//        f(b);
//    }
}
